<%@ page import="com.iweb.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: 92460
  Date: 2020/12/18
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@  taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c"  %>
<html>
<head>
    <title>测试jslt标签</title>
</head>

<body>
<h2>测试choose标签</h2>
<p>输出学生等级A-E</p>
<c:set var="score" scope="page" value="96" />
<p>score:${pageScope.score}</p>
<p>对应等级</p>
<c:choose>
    <c:when test="${score>=90}">
        <span style="color: chartreuse">A</span>
    </c:when>
    <c:when test="${score>=80}">
        B
    </c:when >
    <c:when test="${score>=70}">
        <span style="color: yellow">C</span>
    </c:when >
    <c:when test="${score>=60}">
        D
    </c:when >
    <c:otherwise>
        <span style="color: red">E</span>
    </c:otherwise>
</c:choose >

</body>
</html>